package com.fuqiang.nightshopadmin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fuqiang.nightshopumsmodel.entity.UmsAdminRoleRelation;
import com.fuqiang.nightshopumsmodel.entity.UmsResource;
import com.fuqiang.nightshopumsmodel.entity.UmsRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 后台用户和角色关系表 Mapper 接口
 * </p>
 *
 * @author fuqiang
 * @since 2020-04-14
 */
public interface IUmsAdminRoleRelationMapper extends BaseMapper<UmsAdminRoleRelation> {

    /**
     * 获取指定用户资源
     * @param adminId
     * @return
     */
    List<UmsResource> getResourceList(@Param("adminId") Long adminId);

    /**
     * 获取指定用户角色
     * @param adminId
     * @return
     */
    List<UmsRole> getRoleList(@Param("adminId") Long adminId);
}
